﻿<Window x:Class="DxfEditor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <!-- Columns and Rows definition -->
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <!-- Row 1 -->
        <ToolBarTray Grid.Row="0">
            <ToolBar>
                <Label Content="DXF Editor:"/>
                <Button Click="OnClickOpen" RenderOptions.BitmapScalingMode="NearestNeighbor">
                    <Image Height="16" Source="pack://application:,,,/Images/folder_document.png"/>
                </Button>
                <!--<pt:SpinControl Width="87">
                    <dxmvvm:Interaction.Behaviors>
                        <dxmvvm:EventToCommand EventName="Click"></dxmvvm:EventToCommand>
                    </dxmvvm:Interaction.Behaviors>
                </pt:SpinControl>-->
                <Separator/>
                <Button Click="OnClickAutofill" RenderOptions.BitmapScalingMode="NearestNeighbor">
                    <Image Height="16" Source="pack://application:,,,/Images/window_view.png"/>
                </Button>
                <Button Click="OnClickZoomIn" RenderOptions.BitmapScalingMode="NearestNeighbor">
                    <Image Height="16" Source="pack://application:,,,/Images/zoom_in.png"/>
                </Button>
                <Button Click="OnClickZoomOut" RenderOptions.BitmapScalingMode="NearestNeighbor">
                    <Image Height="16" Source="pack://application:,,,/Images/zoom_out.png"/>
                </Button>
                <ToggleButton x:Name="btnPan" RenderOptions.BitmapScalingMode="NearestNeighbor">
                    <Image Height="16" Source="pack://application:,,,/Images/hand.png"/>
                </ToggleButton>
                <Separator/>
                <Label Content="0; 0" x:Name="lblPosition"/>
            </ToolBar>
        </ToolBarTray>

        <!-- Row 2 -->
        <Grid Grid.Row="1" ClipToBounds="True" Background="White">
            <ZoomableCanvas x:Name="canvas" Scale="1" Offset="0,0" Background="Transparent">
                <!--<ZoomableCanvas.LayoutTransform>
                    <ScaleTransform ScaleX="1" ScaleY="-1" CenterX=".5" CenterY=".5" />
                </ZoomableCanvas.LayoutTransform>-->
            </ZoomableCanvas>
            
        </Grid>
        
    </Grid>
</Window>
